package com.tentact.web1216.service;


import com.tentact.web1216.dao.StudentDao;
import com.tentact.web1216.vo.Student;

import java.util.List;

public class StudentService {

        StudentDao dao=new StudentDao();
        //查询
        public List<Student> selectStudent(Student student) {
        return  dao.selectStudent(student);
    }
    //添加
    public  int insertStudent(Student student){
            return  dao.insertStudent(student);
    }
    //根据学号查询
    public Student selectPrimaryStudent(int id) {
            return  dao.selectPrimaryStudent(id);
    }
    //修改
    public int updateStudent(Student student){
            return  dao.updateStudent(student);
    }
    //删除
    public int deleteById(int id){
            return  dao.deleteById(id);
    }
    //查询全部
    public List<Student> selectBynameStudent(String name) {
            return  dao.selectBynameStudent(name);
    }
}
